<template>
  <div>
    <history-screen @historyExport="historyExport"></history-screen>
    <roll height="584px">
      <export-table ref="table" title="历史账单">
        <el-table :data="tableData" border style="width: 100%">
          <el-table-column type="index" label="序号"></el-table-column>
          <el-table-column prop="date" label="订单号"></el-table-column>
          <el-table-column prop="code" label="用户"></el-table-column>
          <el-table-column prop="code" label="付款时间"></el-table-column>
          <el-table-column prop="code" label="停机原因"></el-table-column>
          <el-table-column prop="code" label="充电站名称"></el-table-column>
          <el-table-column prop="code" label="充电桩名称"></el-table-column>
          <el-table-column prop="code" label="枪编号"></el-table-column>
          <el-table-column prop="code" label="充电时长"></el-table-column>
          <el-table-column prop="code" label="充电量(KWH)"></el-table-column>
          <el-table-column prop="code" label="总费用(元)"></el-table-column>
          <el-table-column prop="code" label="服务费(元)"></el-table-column>
          <el-table-column prop="code" label="退还金额(元)"></el-table-column>
          <el-table-column prop="code" label="退还状态(元)"></el-table-column>
          <el-table-column prop="code" label="优惠金额(元)"></el-table-column>
          <el-table-column prop="code" label="开始充电时间"></el-table-column>
          <el-table-column prop="code" label="结束充电时间"></el-table-column>
          <el-table-column prop="code" label="开始电表数"></el-table-column>
          <el-table-column label="尖峰平谷">
            <template slot-scope="scope">
              <span @click="historySee(scope.row)">查看</span>
            </template>
          </el-table-column>
        </el-table>
      </export-table>
    </roll>
    <div class="block">
      <el-pagination
        @current-change="handleCurrentChange"
        :current-page="currentPage"
        :page-size="pageSize"
        layout="total,  prev, pager, next, jumper"
        :total="20"
      ></el-pagination>
    </div>
  </div>
</template>
<script>
import historyScreen from "./historyScreen";
import roll from "@/components/Roll";

import exportTable from "@/components/exportTable";
export default {
  components: {
    historyScreen,
    exportTable,
    roll
  },
  data() {
    return {
      tableData: [
        {
          date: "2016-05-02",
          code: "1589518635483"
        },
        {
          date: "2016-05-04",
          code: "1589518635483"
        },
        {
          date: "2016-05-01",
          code: "1589518635483"
        }
      ],
         currentPage:1, //当前第几页
        pageSize:10
    };
  },
  methods: {
    historyExport() {
      this.$refs.table.exportExcel();
    },
    historySee() {}
  }
};
</script>
<style scoped>
.block {
    text-align: center;
}
</style>